<?php 
require_once("connect_db.php");
$sql="select meet_datetime,meet_hour from meeting where meet_id='".$_GET["temp"]."'";
$query=mysql_query($sql);
$result=mysql_fetch_array($query);
$more=date('Y-m-d H:i:s',strtotime($result["meet_datetime"]. '+'.$result["meet_hour"].' hour'));
$sqlTeacher="select car.car_id from car,meeting where meet_datetime>='".$result["meet_datetime"]."' and meet_datetime<='".$more."' and car.car_id=meeting.car_id and meeting.car_id='".$_GET["car"]."' and status='Y'";
$queryTeacher=mysql_query($sqlTeacher);
$rchk=mysql_fetch_array($queryTeacher);
if($rchk["car_id"]!="")echo "N";
else echo "Y";

?>